#include<iostream>

using namespace std;

/*class complex
{
public:
	//complex();
	//complex(int a=0);
	complex(double r = 0.0, double i = 0.0);
	complex operator + (complex c);
	complex operator - (complex c);
	complex operator * (complex c);
	complex operator / (complex c);
	void display();
private:
	double real, imag;
};
complex::complex(double r, double i)
{
	real = r;
	imag = i;
}
complex complex::operator +(complex c)
{
	complex temp;
	temp.real = real + c.real;
	temp.imag = imag + c.imag;
	return temp;
}
complex complex::operator -(complex c)
{
	complex temp;
	temp.real = real - c.real;
	temp.imag = imag - c.imag;
	return temp;
}
complex complex::operator *(complex c)
{
	complex temp;
	temp.real = real * c.real - imag * c.imag;
	temp.imag = real * c.imag + c.real * imag;
	return temp;
}
complex complex::operator /(complex c)
{
	complex temp;
	temp.real = real / c.real;
	temp.imag = imag / c.imag;
	return temp;
}
void complex::display()
{
	char* str;
	if (imag > 0)
	{
		cout << real << "+" << imag << "i" << endl;
	}
	else
	{
		cout << real << imag << "i" << endl;
	}
}
int main()
{
	complex c1(12.4, 6.7), c2(13.6, 5.7);
	complex c3(5);
	complex c;
	c1.display();
	c2.display();
	c = c1 + c2;
	c.display();
	system("pause");
}*/
